﻿using System;
using Microsoft.VisualStudio.Shell.Interop;

namespace AzurePlugin.Converter
{
    public class VsShellAdapter
    {
        private readonly IVsShell _vsShell;

        public VsShellAdapter(ServiceProviderAdapter serviceProvider)
        {
            _vsShell = serviceProvider.GetService<IVsShell>();
        }

        public void LoadPackage(Guid guid)
        {
            IEnumPackages enumPackages;
            _vsShell.GetPackageEnum(out enumPackages);
            IVsPackage package;
            _vsShell.LoadPackage(guid, out package);
        }
    }
}
